home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / com_and3.zip / KERUP.CMD < prev    next >
OS/2 REXX Batch file  |  1989-10-09  |  1KB  |  47 lines

  1. ; ----- KERUP: Invoke PCKERMIT to upload.
  2. ; ----------------------------------------------------------------
  3. ;    Note: This script invokes PCKERMIT using the current comm
  4. ;    port settings.
  5. ; ----------------------------------------------------------------
  6. ;
  7. ;    Get the file spec to upload
  8. ;
  9.     GOSUB Get_Name        ; Read file name into S0
  10.     IF FAILED        ; If ESC pressed
  11.        EXIT         ; Stop here
  12.        ENDIF
  13. ;
  14. ;    Invoke PCKERMIT
  15. ;
  16.     COMPARMS S1        ; read current settings
  17.     S2 =  "PCKERMIT.EXE -l " * S1(11:14) * " -b " * S1(0:3) * " -s " * S0 ; e.g. "... -lcom2 -b1200 -s <file>
  18.     RUN S2            ; Load and run
  19.     EXIT
  20. ;
  21. ; ----- Subroutine: Open a window and ask for a file name
  22. ;    SUCCESS/Failed returned to indicate ESCape
  23. ;    S0 returns the name
  24. ;
  25. Get_Name:
  26.     WOPEN 10 10 13 70 (Default) ESC
  27.     ATSAY 10 ,12 (default)    " KERMIT upload "
  28.     ATSAY 11 ,11 (default)    " Specify the file name:"
  29.     ATSAY 13  30 (default) " Press ESC to exit "
  30.     ATGET 12, 12 (default) 54 S0
  31.     WCLOSE
  32.     ;
  33.     ;    If null response, return failed
  34.     ;
  35.     SET SUCCESS ON        ; Default return
  36.     LJ S0            ; Left justify
  37.     IF NULL S0
  38.        SET SUCCESS OFF
  39.        ENDIF
  40.     RETURN
  41.     ;
  42.     ;    ESC hit during entry
  43.     ;
  44. ESC:
  45.     S0 = ""                 ; Make a null return
  46.     RETURN
  47.